// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 根据ID获取升级信息详情 GET /ota/manage/${param0} */
export async function upgradeManageControllerGetById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.upgradeManageControllerGetByIdParams,
  options?: { [key: string]: any },
) {
  const { flowId: param0, ...queryParams } = params;
  return request<API.ApiResultUpgradeManageVO>(`${apiPrefix}/ota/manage/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除升级信息 DELETE /ota/manage/delete */
export async function upgradeManageControllerDelete(
  body: number[],
  options?: { [key: string]: any },
) {
  return request<API.ApiResultBoolean>(`${apiPrefix}/ota/manage/delete`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页获取升级信息 GET /ota/manage/list */
export async function upgradeManageControllerList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.upgradeManageControllerListParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultPaginationUpgradeFlowInfo>(`${apiPrefix}/ota/manage/list`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
